RequestNotify "Unable to open "fontpath"UFST/FontList"
exit
end
call close("fontlist")
/*-- Sort the fontlist so that we can list them fonts in alphabetical order --*/
address command "sort FROM "fontpath"UFST/FontList TO T:FontsSorted"
/*-- Find the sorts of fonts to scan --*/
WizardReq TITLE "PreviewFonts v1.0 by Adam Dawes" LABEL "Please select the type of fonts you wish to preview:" Button 0 "_Intellifont" Button 1 "_Postscript" Button 2 "_TrueType" Button "-2" "_All" Button "-1" "_Cancel"
fonttype = Result
if fonttype = -1 then exit /* user clicked "cancel" */
/*-- Set the page up ready for the font previews --*/
New
Address Value Result
Document A4 "0.5cm" "0.5cm" "1cm" "1cm" 2 "0.5cm"
CentreJustify
/*-- Open our sorted fontlist file --*/
success = open("fontlist","T:FontsSorted")
if success = 0 then do
RequestNotify "Unable to open T:FontsSorted"
exit
end
/*-- Now read through all the fonts --*/
do until eof("fontlist")
currfont = readln("fontlist")
thistype = right(currfont,1)
currfont = left(currfont,pos(",",currfont)-1)
if thistype = fonttype | fonttype = -2 then do
Font NAME currfont SIZE 16
Text currfont": Ea1"
NewParagraph
end
end
/*-- Close and dispose of the sorted fonts file --*/